package com.mijie.homi.listener;

import java.io.File;
import java.util.Map;

import javax.servlet.ServletContextEvent;

import org.apache.log4j.Logger;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils;

import com.mijie.core.CoreContextLoaderListener;
import com.mijie.core.StringFilter;
import com.mijie.homi.util.ServerHelper;

public class HomiContextListener extends CoreContextLoaderListener {

	@Override
	public void contextInitialized(ServletContextEvent sce) {
		super.contextInitialized(sce);
		File file = StringFilter.getInstanct().getFile();
		if(file!=null){
			ServerHelper.reExportSensitiveWordFromDB(file);
			StringFilter.getInstanct().reload();
		}
	}
	

}
